import { Module } from '@nestjs/common';
import { APP_GUARD } from '@nestjs/core';

import { RequestMapsModule } from '@modules/request-maps/request-maps.module';
import { UserActiveTokensModule } from '@modules/user-active-tokens/user-active-tokens.module';

import { AuthController } from './controllers/auth.controller';
import { JwtAuthGuard } from './guards/jwt-auth.guard';
import { SecurityRequestMapQueryService } from './services/security-request-map-query.service';
import { UserActiveTokenManagerService } from './services/user-active-token-manager.service';

@Module({
  imports: [RequestMapsModule, UserActiveTokensModule],
  controllers: [AuthController],
  providers: [
    {
      provide: APP_GUARD,
      useClass: JwtAuthGuard,
    },
    SecurityRequestMapQueryService,
    UserActiveTokenManagerService,
  ],
})
export class AuthModule {}
